// 遮罩层：覆盖整个页面，半透明
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

// 弹窗容器：宽度806px，高度1245px，背景白，圆角
.medical-bill-modal {
    width: 806px;
    height: 1245px;
    background-color: #fff;
    border-radius: 8px;
    padding: 24px;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
    display: flex;
    flex-direction: column;

    // 头部：标题 + 关闭按钮
    .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;

        h2 {
            font-size: 24px;
            font-weight: bold;
        }

        .close-btn {
            background: none;
            border: none;
            cursor: pointer;
            svg {
                width: 24px;
                height: 24px;
                color: #999;
            }
        }
    }

    // 科室、医生信息
    .dept-doctor {
        display: flex;
        justify-content: space-between;
        margin-bottom: 24px;
        font-size: 16px;
        color: #666;
    }

    // 项目列表
    .items-table {
        margin-bottom: 24px;
        flex-grow: 1; // 占满剩余垂直空间

        .table-header {
            display: flex;
            justify-content: space-between;
            background-color: #f5f5f5;
            padding: 12px;
            font-weight: bold;
            font-size: 16px;
        }

        .table-row {
            display: flex;
            justify-content: space-between;
            padding: 12px 0;
            border-bottom: 1px dashed #eee;

            .item-info {
                .item-name {
                    font-weight: bold;
                    font-size: 16px;
                    margin-bottom: 8px;
                }

                .item-unit {
                    font-size: 14px;
                    color: #666;
                }
            }

            .item-subtotal {
                color: #ff672b;
                font-weight: bold;
                font-size: 16px;
            }
        }
    }

    // 分页
    .pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 24px;

        .page-btn {
            padding: 8px 24px;
            margin: 0 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            background-color: #fff;
            cursor: pointer;
            font-size: 16px;

            &.prev {
                background-color: #eaeaea;
            }

            &.next {
                background-color: #409eff;
                color: #fff;
                border-color: #409eff;
            }
        }
    }

    // 就诊人、卡号、总价
    .patient-info {
        display: flex;
        justify-content: space-between;
        margin-bottom: 24px;

        .patient-details {
            p {
                margin: 8px 0;
                font-size: 16px;
                color: #666;
            }
        }

        .total-price {
            text-align: right;

            p:first-child {
                font-size: 24px;
                color: #ff3b30;
                font-weight: bold;
                margin-bottom: 8px;
            }

            p:last-child {
                font-size: 14px;
                color: #999;
            }
        }
    }

    // 操作按钮
    .action-buttons {
        display: flex;
        justify-content: space-around;

        .btn {
            padding: 12px 48px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 18px;

            &.return {
                border: 1px solid #409eff;
                background-color: #fff;
                color: #409eff;
            }

            &.pay {
                background-color: #52c41a;
                color: #fff;
                border: none;
            }
        }
    }
}
